const state = {
  token: '',
  userInfo: '',
  currentStuDetail: {},
  radioList: [
    {
      id: '1',
      question: '今天星期几',
      selectA: '周一',
      selectB: '周二',
      selectC: '周三',
      selectD: '周四',
      rightAnswer: '周一',
      errorAnswer: '周三',
      score: '5',
      answerDetail: '参考日历显示'
    },
    {
      id: '2',
      question: '水果',
      selectA: '桃',
      selectB: '梨',
      selectC: '苹果',
      selectD: '香蕉'
    },
    {
      id: '3',
      question: '车辆',
      selectA: '一辆',
      selectB: '两辆',
      selectC: '三辆',
      selectD: '四辆'
    }
  ],
  multiList: [
    {
      id: '1',
      question: '大家的姓名',
      selectA: '张三',
      selectB: '李四',
      selectC: '王五',
      selectD: '赵六'
    },
    {
      id: '2',
      question: '你在干什么',
      selectA: '吃饭',
      selectB: '睡觉',
      selectC: '打游戏',
      selectD: '学习'
    }
  ],
  judgeList: [
    { id: '1', question: '一加一等于二', right: '对', error: '错' },
    { id: '2', question: '一加二等于三', right: '对', error: '错' }
  ]
}
const mutations = {
  setToken (state, token) {
    state.token = token
  },
  setUserInfo (state, userInfo) {
    state.userInfo = userInfo
  },
  setCurrentStuDetail (state, currentStuDetail) {
    state.currentStuDetail = currentStuDetail
    sessionStorage.setItem('currentStuName', currentStuDetail.name)
  },
  delCurrentStuDetail (state) {
    state.currentStuDetail = null
    sessionStorage.removeItem('currentStuName')
  }
}
const actions = {}

export default {
  state,
  mutations,
  actions
}
